import unittest

input_output=[
    ["5, 3",10],
    ["100, 3",161700],
    ["4, 0",1],    
    ["1, 1",1],    
    ]

if __name__ == "__main__":    
    n,k=eval(raw_input())
    def m(l):return reduce(lambda x,y:x*y,[1]+l)
    print m(range(n-k+1,n+1))/m(range(1,k+1))
    
class ChooseTest(unittest.TestCase):
    def choose1(self,input):
        n,k=eval(input)
        def m(l):return reduce(lambda x,y:x*y,[1]+l)        
        return m(range(n-k+1,n+1))/m(range(1,k+1))
    
                    
    def choose0(self,input):
        n,k=[int(j) for j in input.split(',')]        
        def mul(l):return reduce(lambda x,y:x*y,[1,]+l)
        return mul(range(1,n+1)) / mul(range(1,k+1)) / mul(range(1,n-k+1))                
    def test_method(self):
        for attr in dir(self):
            if 0 == attr.find('choose'):
                for data in input_output:
                    self.assertEquals(data[1], getattr(self,attr)(data[0]))
    def test_cmd(self):
        import os        
        for inout in input_output:
            fn='data.txt'                
            f=file(fn,'w')
            f.write(inout[0])
            f.close()            
            self.assert_(str(inout[1]) in os.popen("python %s < %s"%(__file__,fn)).read())
            os.remove(fn)
  
    